<extend name="Base:block" />
<block name="title"><title>菜单列表</title></block>
<block name="seo"></block>
<block name="operation_nav">
    <ul class="operation_nav">
        <li class="none"><a href="{:U('Admin/Menu/index')}">后台菜单列表</a></li>
        <li class="none"><a href="{:U('Admin/Menu/add')}">添加菜单</a></li>
    </ul>        
</block>
<block name="main_content">
<form method="post" class="form-horizontal" action="__SELF__">
    <div class="table-responsive">
    <table class="table table-striped table-bordered table-hover " id="editable" >
        <thead>
            <tr>
                <th align="center">ID</th>
                <th align="center">菜单名称</th>
                <th align="center">菜单URL</th>
                <th align="center">菜单说明</th>
                <th align="center">状态</th>
                <th align="center">操作</th>
            </tr>
        </thead>
        <tbody>

            <volist name="data" id="vo"  >
                <div child="{$vo.child}" menuID="{$vo.id}">
                    <tr class="gradeX " >
                        <td class="center" width="6%" align="center">
                            {$vo.id}
                        </td>
                        <td class="center" width="25%" >
                            <table cellpadding="0" cellspacing="0">
                            <tbody><tr>
                                <if condition="$vo.level gt  0">
                                    <for start="1" end="$vo.level">
                                        <td class="cate_line col-sm-0">&nbsp;</td>
                                    </for>
                                    <td class="cate_middle col-sm-0">&nbsp;</td>
                                    <td>{$vo.title_show}<span class="gray i"></span></td>

                                <else/>
                                    {$vo.title_show}
                                </if>   
                            </tr>
                            </tbody>
                            </table>
                        </td>
                        <td class="center" width="25%">{$vo.url}</td>
                        <td class="center" width="15%">{$vo.description}</td>
                        <td class="center" width="10%" align="center">
                            <if condition ="$vo.status eq 1">
                                <button class="btn btn-xs btn-info " value="{$vo.status}" type="button"><i class="fa fa-check"></i>
                                </button>
                            <else/>
                                <button class="btn btn-xs btn-warning " value="{$vo.status}" type="button"><i class="fa fa-times"></i>
                                </button>
                            </if>
                        </td>
                        <td class="center" >
                            <a href="{:U('Admin/Menu/edit')}&id={$vo.id}"class="btn btn-xs btn-info " type="button"><i class="fa fa-paste"></i> 编辑
                            </a>
                            <a class="btn btn-xs btn-warning " type="button"><i class="fa fa-trash-o"></i> 刪除
                            </a>
                        </td>
                    </tr>
                </div>
            </volist>
            
        </tbody>
    </table>
    </div>
    <div class="form-group">
        <div class="col-sm-4 col-sm-offset-2">
            <button class="btn btn-primary" type="submit">保存排序</button>
        </div>
    </div>
</form>
</block>